package com.data.structure.demo01;

import java.util.ArrayList;
import java.util.List;

public class TreeNode<T> {
    T value;
    List<TreeNode<T>> children;

    public TreeNode(T value, List<TreeNode<T>> children) {
        this.value = value;
        this.children = new ArrayList<>();
    }
    public void addChild(TreeNode<T> child){
        children.add(child);
    }
}
